﻿using System;
using Sharp.Infrastructure.Interfaces;

namespace Sharp.Portal.Mvc
{
    /// <summary>
    /// 权限标识
    /// </summary>
    public class PermissionAttribute : System.Attribute
    {

        public PermissionAttribute()
        {
            this.Code = "";
        }

        public PermissionAttribute(string name, int order, string code)
        {
            this.Name = name;
            this.Order = order;
            this.Code = code;
            this.Category = PermissionCategory.OperationItem;
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Order { get; set; }
        /// <summary>
        /// 上级
        /// </summary>
        public string Parent { get; set; }
        public string Code { get; set; }

        /// <summary>
        /// 类别
        /// </summary>
        public string Category { get; set; }
    }
}
